home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Enhancements / ArcDir / Check-ID.rexx < prev    next >
OS/2 REXX Batch file  |  1998-06-27  |  996b  |  37 lines

  1. /*  Check LhA and LZX filetype ID */
  2. lf = '0a'x
  3. qu = '22'x
  4. options results
  5. if ~show('l','rexxsupport.library') then call addlib('rexxsupport.library',0,-30)
  6. if ~show('p','DOPUS.1') then do
  7.   address command 'RequestChoice >NIL: "DOpus not running" OK'
  8.   exit
  9.   end
  10. address 'DOPUS.1'
  11. say
  12. say 'Choose an LhA archive from the file requester'
  13. address command 'RequestFile >t:id-1 RAM: title "Choose LhA archive"'
  14. say
  15. say 'Choose an LZX archive from the file requester'
  16. address command 'RequestFile >t:id-2 RAM: title "Choose LZX archive"'
  17. if open(infile,'t:id-1','r') then do
  18.   a = readln(infile)
  19.   call close(infile)
  20.   end
  21. if open(infile,'t:id-2','r') then do
  22.   b = readln(infile)
  23.   call close(infile)
  24.   end
  25. dopus getfiletype a ID
  26. c = result
  27. dopus getfiletype b ID
  28. d = result
  29. text = 'Edit line 39 in ArcDir.dopus5 to be:   '
  30. textb = 'idtype = 'qu||strip(c,,'"')||' '||strip(d,,'"')||qu''
  31. say
  32. say text||textb
  33. say
  34. say 'Window will close in 60 seconds'
  35. call delay(3000)
  36. exit
  37.